-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect CLJ_JVM_OPTS env var options when downloading clojure-tools #73
Respect CLJ_JVM_OPTS env var options when downloading clojure-tools #73
Conversation
@ikappaki Beautiful PR, just a few minor comments. For testing bb, I added https://github.com/babashka/babashka-dev-builds/releases/tag/v1.0.165-SNAPSHOT You can install this with the installer script as well by providing a version with:
Please update CI and turn bb tests back on. |
1. Convert inline java program as a single string. 2. Simplify formatting of download msgs. 3. Only display a single msg while downloading, and only print out the other message when new DEPS_CLJ_DBG env var is set. 4. Correct typos. 5. Update CI to use bb 1.0.165-SNAPSHOT for this review purposes and restore bb tests in CI.
["-Xms256m"]))) | ||
(let [java-clj-jvm-opts (when clj-jvm-opts (vec (concat clj-jvm-opts | ||
proxy-settings | ||
["-Xms256m"])))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the -Xms256m argument for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I picked it up from the clj-main-cmd
a little bit further down the code, I assumed it was for some unknown to me use, shall I remove it?
Hi @borkdude, I've addressed most of the review comments and updated the CI configs to use the babashka snapshot (markes as REVIEW) so as to run the In addition I've added some comments to the The only thing I haven't address is determining the java version, can you have a look at my reply and available options please? Thanks, |
I think this looks good. I looked into the Xms256 thing and really can't find where this came from. This is the initial commit of the deps.clj script and it was already there. I think I'll just remove it since it isn't there in the clojure script either. |
Much thanks! |
Replaces snapshot introduced in borkdude#73
Replaces snapshot introduced in #73 Co-authored-by: ikappaki <[email protected]>
Hi,
can you please consider patch to try and download clojure tools archive via a java subprocess that respects the
CLJ_JVM_OPTS
environment variable. This addresses #66.I have disabled the babashka tests because it can't recognise the new imported
java.net.URLConnection
symbol, would it be possible to add it to the babashka arsenal please if review is successful please?Changes are:
java
executable first, fallback to direct download, and if that fails, display a message to the user where to copy the zip archive to. The java download methods requires Java11+/JEP-330.unzip
withFilesystems/newFilesystem
that was never closed (it is now in awith-open
form).tools-dir
was passed toclojure-tools-jar-download
as a destination directory instead oflibexec-dir
.HttpURLConnection
is only set when downloading the clojure tools archive, if the src URL ishttp
. For testing we usefile://
where possible. This introduced thejava.net.URLConnection
symbol, but unfortunately it is not available in babashka and thus the bb tests have been temporarily disabled until this is resolved.README.md
mentioned the new env variables and other minor corrections.Thanks,